//
//  ExbitionContentView.m
//  PASystem
//
//  Created by 刘沿 on 16/8/24.
//  Copyright © 2016年 czd. All rights reserved.
//

#import "ExbitionContentView.h"

@implementation ExbitionContentView

+(instancetype)WithExbitionContentView{


    return [[[NSBundle mainBundle] loadNibNamed:@"ExbitionContentView" owner:nil options:nil] lastObject];
}


-(void)setModel:(ExhibitionDetailModel *)model{

    _model = model;

    if (self.type == 1) {
        
        //展会内容
        NSString *str = [model.CONTENT stringByReplacingOccurrencesOfString:@"&lt;" withString:@"<"];
        
        NSString *str2 = [str stringByReplacingOccurrencesOfString:@"&gt;" withString:@">"];
        
        [self.webView loadHTMLString:str2 baseURL:nil];
    }else if(self.type == 2){
    
        //行程安排
        NSString *str = [model.XCFJ stringByReplacingOccurrencesOfString:@"&lt;" withString:@"<"];
        
        NSString *str2 = [str stringByReplacingOccurrencesOfString:@"&gt;" withString:@">"];
        
        [self.webView loadHTMLString:str2 baseURL:nil];
    
    }else if(self.type == 3){
        
        //行程安排
        NSString *str = [model.CTCL stringByReplacingOccurrencesOfString:@"&lt;" withString:@"<"];
        
        NSString *str2 = [str stringByReplacingOccurrencesOfString:@"&gt;" withString:@">"];
        
        [self.webView loadHTMLString:str2 baseURL:nil];
        
    }else{
        NSString *str = [model.XMZJ stringByReplacingOccurrencesOfString:@"&lt;" withString:@"<"];
        
        NSString *str2 = [str stringByReplacingOccurrencesOfString:@"&gt;" withString:@">"];
        
        [self.webView loadHTMLString:str2 baseURL:nil];
    
    }

}


@end
